package com.jblog.core.model.blog;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * PostTagLink.java
 */
public class PostTagLink implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    private Post post;
    private Tag tag;
    private Timestamp createTime = new Timestamp(System.currentTimeMillis());

    public PostTagLink() {
    }

    public PostTagLink(Post post, Tag tag) {
        this.post = post;
        this.tag = tag;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Post getPost() {
        return post;
    }

    public void setPost(Post post) {
        this.post = post;
    }

    public Tag getTag() {
        return tag;
    }

    public void setTag(Tag tag) {
        this.tag = tag;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "PostTagLink [post=" + post + ", tag="
                + tag + ", id=" + id + "]";
    }

}
